package objects;

public enum Domino {
	
	ZERO_ZERO (0,0),        ONE_ZERO(1,0),          TWO_ZERO(2,0),          THREE_ZERO(3,0),                FOUR_ZERO(4,0),		FIVE_ZERO(5,0), 		SIX_ZERO(6,0),           SEVEN_ZERO(7,0),                EIGHT_ZERO(8,0),		       NINE_ZERO(9,0), 		TEN_ZERO(10,0),           ELEVEN_ZERO(11,0),      TWELVE_ZERO(12,0),
	ZERO_ONE(0,1),		ONE_ONE(1,1),           TWO_ONE(2,1),           THREE_ONE(3,1),                 FOUR_ONE(4,1),		FIVE_ONE(5,1), 		SIX_ONE(6,1),           SEVEN_ONE(7,1),                EIGHT_ONE(8,1),		       NINE_ONE(9,1), 		TEN_ONE(10,1),           ELEVEN_ONE(11,1),      TWELVE_ONE(12,1),
	ZERO_TWO(0,2),		ONE_TWO(1,2), 		TWO_TWO(2,2),           THREE_TWO(3,2),                 FOUR_TWO(4,2),		FIVE_TWO(5,2), 		SIX_TWO(6,2),           SEVEN_TWO(7,2),                EIGHT_TWO(8,2),		       NINE_TWO(9,2), 		TEN_TWO(10,2),           ELEVEN_TWO(11,2),      TWELVE_TWO(12,2),
	ZERO_THREE(0,3), 	ONE_THREE(1,3),		TWO_THREE(2,3),		THREE_THREE(3,3),               FOUR_THREE(4,3),	FIVE_THREE(5,3), 	SIX_THREE(6,3),         SEVEN_THREE(7,3),              EIGHT_THREE(8,3),	       NINE_THREE(9,3), 		TEN_THREE(10,3),           ELEVEN_THREE(11,3),      TWELVE_THREE(12,3),
	ZERO_FOUR(0,4),		ONE_FOUR(1,4),		TWO_FOUR(2,4),		THREE_FOUR(3,4),		FOUR_FOUR(4,4),         FIVE_FOUR(5,4), 	SIX_FOUR(6,4),          SEVEN_FOUR(7,4),               EIGHT_FOUR(8,4),		       NINE_FOUR(9,4), 		TEN_FOUR(10,4),           ELEVEN_FOUR(11,4),      TWELVE_FOUR(12,4),
	ZERO_FIVE(0,5),		ONE_FIVE(1,5),		TWO_FIVE(2,5),		THREE_FIVE(3,5),		FOUR_FIVE(4,5),		FIVE_FIVE(5,5),         SIX_FIVE(6,5),          SEVEN_FIVE(7,5),               EIGHT_FIVE(8,5),		       NINE_FIVE(9,5), 		TEN_FIVE(10,5),           ELEVEN_FIVE(11,5),      TWELVE_FIVE(12,5),
	ZERO_SIX(0,6),		ONE_SIX(1,6),		TWO_SIX(2,6),		THREE_SIX(3,6),			FOUR_SIX(4,6),		FIVE_SIX(5,6),		SIX_SIX(6,6),           SEVEN_SIX(7,6),                EIGHT_SIX(8,6),		       NINE_SIX(9,6), 		TEN_SIX(10,6),           ELEVEN_SIX(11,6),      TWELVE_SIX(12,6),
	ZERO_SEVEN(0,7),	ONE_SEVEN(1,7),		TWO_SEVEN(2,7),		THREE_SEVEN(3,7),		FOUR_SEVEN(4,7),	FIVE_SEVEN(5,7),	SIX_SEVEN(6,7),		SEVEN_SEVEN(7,7),              EIGHT_SEVEN(8,7),	       NINE_SEVEN(9,7), 	TEN_SEVEN(10,7),         ELEVEN_SEVEN(11,7),      TWELVE_SEVEN(12,7),
	ZERO_EIGHT(0,8),	ONE_EIGHT(1,8),		TWO_EIGTH(2,8),		THREE_EIGHT(3,8),		FOUR_EIGHT(4,8),	FIVE_EIGHT(5,8),	SIX_EIGHT(6,8),		SEVEN_EIGHT(7,8),		EIGHT_EIGHT(8,8),              NINE_EIGHT(9,8), 	TEN_EIGHT(10,8),         ELEVEN_EIGHT(11,8),      TWELVE_EIGHT(12,8),
	ZERO_NINE(0,9),		ONE_NINE(1,9),		TWO_NINE(2,9),		THREE_NINE(3,9),		FOUR_NINE(4,9),		FIVE_NINE(5,9),		SIX_NINE(6,9),		SEVEN_NINE(7,9),		EIGHT_NINE(8,9),		NINE_NINE(9,9),	        TEN_NINE(10,9),           ELEVEN_NINE(11,9),      TWELVE_NINE(12,9),
	ZERO_TEN(0,10),		ONE_TEN(1,10),		TWO_TEN(2,10),		THREE_TEN(3,10),		FOUR_TEN(4,10),		FIVE_TEN(5,10),		SIX_TEN(6,10),		SEVEN_TEN(7,10),		EIGHT_TEN(8,10),		NINE_TEN(9,10),		TEN_TEN(10,10),           ELEVEN_TEN(11,10),      TWELVE_TEN(12,10),
	ZERO_ELEVEN(0,11),	ONE_ELEVEN(1,11),	TWO_ELEVEN(2,11),	THREE_ELEVEN(3,11),		FOUR_ELEVEN(4,11),	FIVE_ELEVEN(5,11),	SIX_ELEVEN(6,11),	SEVEN_ELEVEN(7,11),		EIGHT_ELEVEN(8,11),		NINE_ELEVEN(9,11),	TEN_ELEVEN(10,11),	ELEVEN_ELEVEN(11,11),     TWELVE_ELEVEN(12,11),
	ZERO_TWELVE(0,12),	ONE_TWELVE(1,12),	TWO_TWELVE(2,12),	THREE_TWELVE(3,12),		FOUR_TWELVE(4,12),	FIVE_TWELVE(5,12),	SIX_TWELVE(6,12),	SEVEN_TWELVE(7,12),		EIGHT_TWELVE(8,12),		NINE_TWELVE(9,12),	TEN_TWELVE(10,12), 	ELEVEN_TWELVE(11,12),	TWELVE_TWELVE(12,12);
	
	private final Integer first;
	private final Integer second;
	
	Domino(int f, int s){
		this.first=f;
		this.second=s;
	}
	public int getFirst()
	   {
	    return first;
	   }
	public int getSecond()
	   {
	    return second;
	   }
        
	public static Domino findDomino(int f, int s){
		Domino result =null;
		for(Domino d : Domino.values()){
			if(d.getFirst()== f && d.getSecond()== s){
				return d;
			}			
		}
		
		return result;
	}
	

}
